package com.geekbing.elklog.controller;

import com.geekbing.elklog.util.response.Result;
import com.geekbing.elklog.util.response.ResultCode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

/**
 * @author bing
 */
@RestController
@RequestMapping("/log")
public class MainController {
    private static final Logger log = LoggerFactory.getLogger(MainController.class);

    @GetMapping("/level")
    public Result hello(@RequestParam("level") String level) {
        log.info("/user/level?level={}", level);
        return Result.build().setCode(ResultCode.SUCCESS).setData("hello");
    }
}
